//:C16:StackTemplateTest.cpp
// Test simple stack template
// {L} fibonacci
#include "fibonacci.h"
#include "StackTemplate.h"
#include <iostream>
#include <fstream>
#include <string>
using namespace std;

int main(void){
    StackTemplate<int> is;
    for(int i = 0; i < 20; i++){
        is.push(fibonacci(i));
    }

    for(int k = 0; k < 20; k++){
        cout << is.pop() << '\n';
    }

    ifstream in("StackTemplateTest.cpp");
    assure(in, "StackTemplateTest.cpp");
    string line;
    StackTemplate<string> strings;
    
    while(getline(in, line)){
        strings.push(line);
    }

    while(strings.size() > 0){
        cout << "strings.pop() " << '\n';
    }
    return 0;
}

